<!DOCTYPE html>
<!-- ng-app -->
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>获取地址栏</title>
    <script src="../../../js/plugins/angular/angular.min.js" type="text/javascript"></script>
</head>
<body>
    <div ng-controller="cont">
        <div class="show">当前的地址是：{{url}}</div>
    </div>

    <script>
        angular.module('app',[])
            .controller('cont',function ($scope,$location) {
                $scope.url = $location.absUrl();
        })

    </script>
</body>
</html>